package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ee.chat.common.entity.UserOperationLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Shane
 * @since 2019-10-06
 */
public interface UserOperationLogMapper extends BaseMapper<UserOperationLog> {
    /**
     * 获取用户指定类型的最新操作记录
     * @Author Shane
     * @Date 2020/1/30 23:54
     * @param
     * @return
     */
    UserOperationLog getNewsetOperationLog(@Param("userId") Integer userId, @Param("operationId") Integer operationId);

    /**
     * 获取用户操作动态
     * @Author Shane
     * @Date 2020/8/19 16:00
     * @param
     * @return
     */
    IPage<List<Map<String, Object>>> getUserOperationInfo(Page page, @Param("curr") Integer curr);

    /**
     * 获取推送动态实体
     * @param id
     * @return
     */
    Map<String, Object> getOperationMessgae(@Param("id") Integer id);
}